package com.quxiu.system.mapper;

import com.quxiu.system.domain.BpmFormData;
import com.quxiu.system.domain.BpmProcInstNode;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 流程分组Mapper接口
 *
 * @author quxiu
 * @date 2024-06-14
 */
@Mapper
public interface BpmProcInstNodeMapper {
    int insert(BpmProcInstNode bpmProcInstNode);
    int insertBatch(List<BpmProcInstNode> bpmProcInstNodes);

    int deleteByProcInstId(@Param("procInstId") Long procInstId);

    List<BpmProcInstNode> selectByProcInstId(@Param("procInstId") Long procInstId);

    BpmProcInstNode getRunningNode(@Param("procInstId") Long procInstId);
    BpmProcInstNode getNodeByParentId(@Param("procInstId") Long procInstId, @Param("parentId") Long parentId);
    int updateStatus(@Param("nodeId") Long nodeId, @Param("status") String status);

    BpmProcInstNode selectByNodeId(@Param("procInstId") Long procInstId, @Param("nodeId") Long nodeId);

    void updateParentId(@Param("nodeId") Long nodeId, @Param("parentId") Long parentId);

    void deleteForUnStart(@Param("procInstId") Long procInstId);
}
